package model

import "time"

type Task struct {
	ID          uint      `gorm:"primaryKey"`
	TaskName    string    `gorm:"type:varchar(50);uniqueIndex;comment:任务名称"`
	Description string    `gorm:"type:varchar(200);comment:任务描述"`
	ConfigID    uint      `gorm:"comment:关联采集配置ID"`
	CronExpr    string    `gorm:"type:varchar(50);comment:Cron表达式"`
	Status      string    `gorm:"type:varchar(20);comment:任务状态"`
	Priority    int       `gorm:"comment:优先级"`
	Timeout     int       `gorm:"comment:超时时间(秒)"`
	RetryTimes  int       `gorm:"comment:重试次数"`
	CreatedAt   time.Time `gorm:"comment:创建时间"`
	UpdatedAt   time.Time `gorm:"comment:更新时间"`
}
